.class public Les/sk0;
.super Ljava/lang/Object;
.source "BaseDownloadMonitorListener.java"

# interfaces
.implements Les/zl0;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method private a(Les/zn0;Les/nj0;)V
    .locals 3
    .param p1    # Les/zn0;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Les/nj0;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 17
    invoke-virtual {p1}, Les/zn0;->N0()I

    move-result v0

    invoke-static {v0}, Les/jo0;->a(I)Les/jo0;

    move-result-object v0

    const-string v1, "exec_clear_space_switch"

    const/4 v2, 0x0

    .line 18
    invoke-virtual {v0, v1, v2}, Les/jo0;->a(Ljava/lang/String;I)I

    move-result v0

    const/4 v1, 0x1

    if-eq v0, v1, :cond_0

    return-void

    .line 19
    :cond_0
    invoke-static {}, Les/uk0;->a()Les/uk0;

    move-result-object v0

    const-string v1, "cleanspace_switch_open"

    invoke-virtual {v0, v1, p2}, Les/uk0;->a(Ljava/lang/String;Les/nj0;)V

    .line 20
    invoke-static {}, Les/tk0;->c()Les/tk0;

    move-result-object p2

    new-instance v0, Les/bk0;

    invoke-direct {v0, p1}, Les/bk0;-><init>(Les/zn0;)V

    invoke-virtual {p2, v0}, Les/tk0;->a(Ljava/lang/Runnable;)V

    return-void
.end method


# virtual methods
.method public a(Les/zn0;Lcom/ss/android/socialbase/downloader/e/a;I)V
    .locals 3

    if-nez p1, :cond_0

    return-void

    :cond_0
    const/4 v0, -0x1

    if-ne p3, v0, :cond_4

    const/4 p3, 0x0

    if-eqz p2, :cond_3

    .line 1
    :try_start_0
    invoke-static {p2}, Les/cl0;->a(Lcom/ss/android/socialbase/downloader/e/a;)Z

    move-result p3

    if-eqz p3, :cond_2

    .line 2
    invoke-static {}, Les/vj0;->c()Les/vj0;

    move-result-object p3

    invoke-virtual {p3, p1}, Les/vj0;->a(Les/zn0;)Les/nj0;

    move-result-object p3

    if-eqz p3, :cond_2

    .line 3
    invoke-static {}, Les/lk0;->l()Les/ri0;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 4
    invoke-static {}, Les/lk0;->l()Les/ri0;

    move-result-object v0

    invoke-virtual {p3}, Les/nj0;->a()J

    move-result-wide v1

    invoke-interface {v0, v1, v2}, Les/ri0;->a(J)V

    .line 5
    :cond_1
    invoke-static {}, Les/uk0;->a()Les/uk0;

    move-result-object v0

    const-string v1, "download_failed_for_space"

    invoke-virtual {v0, v1, p3}, Les/uk0;->a(Ljava/lang/String;Les/nj0;)V

    .line 6
    invoke-static {}, Les/dk0;->d()Les/dk0;

    move-result-object v0

    invoke-virtual {p1}, Les/zn0;->Q0()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Les/dk0;->c(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 7
    invoke-static {}, Les/uk0;->a()Les/uk0;

    move-result-object v0

    const-string v1, "download_can_restart"

    invoke-virtual {v0, v1, p3}, Les/uk0;->a(Ljava/lang/String;Les/nj0;)V

    .line 8
    invoke-direct {p0, p1, p3}, Les/sk0;->a(Les/zn0;Les/nj0;)V

    .line 9
    :cond_2
    invoke-static {}, Les/lk0;->i()Lorg/json/JSONObject;

    move-result-object p3

    const-string v0, "exception_msg_length"

    const/16 v1, 0x1f4

    invoke-virtual {p3, v0, v1}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I

    move-result p3

    .line 10
    invoke-virtual {p2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0, p3}, Les/cl0;->a(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object p3

    .line 11
    new-instance v0, Lcom/ss/android/socialbase/downloader/e/a;

    invoke-virtual {p2}, Lcom/ss/android/socialbase/downloader/e/a;->a()I

    move-result v1

    invoke-direct {v0, v1, p3}, Lcom/ss/android/socialbase/downloader/e/a;-><init>(ILjava/lang/String;)V

    move-object p3, v0

    .line 12
    :cond_3
    invoke-static {}, Les/uk0;->a()Les/uk0;

    move-result-object v0

    invoke-virtual {v0, p1, p3}, Les/uk0;->a(Les/zn0;Lcom/ss/android/socialbase/downloader/e/a;)V

    .line 13
    invoke-static {}, Les/fl0;->a()Les/fl0;

    move-result-object p3

    const-string v0, ""

    invoke-virtual {p3, p1, p2, v0}, Les/fl0;->a(Les/zn0;Lcom/ss/android/socialbase/downloader/e/a;Ljava/lang/String;)V

    goto :goto_0

    :cond_4
    const/4 p2, -0x3

    if-ne p3, p2, :cond_5

    .line 14
    invoke-static {}, Les/vj0;->c()Les/vj0;

    move-result-object p2

    invoke-virtual {p2, p1}, Les/vj0;->a(Les/zn0;)Les/nj0;

    move-result-object p2

    .line 15
    invoke-static {p1, p2}, Les/pj0;->a(Les/zn0;Les/nj0;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 16
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    :cond_5
    :goto_0
    return-void
.end method
